home *** CD-ROM | disk | FTP | other *** search
/ Acorn User: China / Acorn User China CD-ROM (UK) (Disc A) / Acorn User China CD-ROM (UK) (Disc A).bin / HENSA / MISC / BASICLIB.ARC / !BasicLib_!Help < prev    next >
Encoding:
Text File  |  1992-08-27  |  3.2 KB  |  66 lines

  1. > <BasicLib$Dir>.!Help
  2.  
  3.   The floating point assembler FloatAss gives access to floating-point
  4. assembler mnemonics from the Basic assembler. It should be installed with
  5. LIBRARY "<BasicLib$Dir>.FloatAss", and used by putting
  6. FNfloat("<operation>") into an assembler program. The full syntax is
  7. supported, together with the pseudo-ops EQUFS, EQUFD, EQUFE and EQUFP to
  8. produce floating-point constants of the required precision. EQUFD and EQUFE
  9. require the floating point emulator to be present at assembly time, as Basic
  10. doesn't have the precision required to generate these.
  11.  
  12.   The OPT pseudo-operation is also supported; this just sets the global
  13. variable Z%. Note that the initial value of Z% will be unpredictable, so you
  14. should always set OPT explicitly.
  15.  
  16.   An example file FloatCirc is provided; it just draws a circle. The code
  17. isn't supposed to be particularly efficient, it just shows how to use the
  18. floating-point intructions.
  19.  
  20.   It's effectively impossible to test all options (it would take a lot
  21. longer than writing the code in the first place), so no guarantee is given
  22. that the correct code will always be assembled. To help with problems, an
  23. extra option can be enabled by setting bit 3 of the OPT (numbers 8-15),
  24. which will use the SWI Debugger_Disassemble to disassemble the code which
  25. has been generated, and print this in the same format as the normal assembly
  26. listing. It is therefore possible to compare the output with the input,
  27. which should highlight any problems. This facility does not apply to
  28. constants generated with EQUFx; however, the most common format here is
  29. likely to be packed decimal, and this is fairly easy to decode by eye.
  30.  
  31.   Internal variables are all local, except for Z% described above. No
  32. internal floating-point variables are used, so expressions involving them
  33. should always evaluate correctly. The only exception to this is that PC and
  34. pc are made local and defined to 15 while evaluating register numbers, as
  35. these are known internally by the normal Basic assembler.
  36.  
  37.   Unfortunately, procedures and functions can't be made local in Basic. The
  38. names used internally are:
  39.  
  40. PROCsplit    PROCopt        PROCequfp   PROCequfs   PROCequf
  41. PROCopcode   PROCmnem       FNgetreg    PROCencode  PROCregs
  42. PROCregaddr  PROCloadstore  PROCsetaddr
  43. FNisnum      FNissnum       FNisfnum    FNisexpnum  FNtoupper
  44.  
  45.   Finally, the standard disclaimer. This code is FreeWare, but I retain
  46. copyright. You can copy it freely, as long as you don't sell it for profit,
  47. and as long as this file goes with it. If you make any changes add a comment
  48. to that effect in both the program header and in this file. I make no
  49. warranty for the performance of the program, fitness for any purpose, or
  50. absence of bugs, and I take no responsibility for files erased, computers
  51. blown up, nuclear wars started, or any other consequence of the use of the
  52. program. Basically, I've done the best I can to make it bug free, but beyond
  53. that (as with all PD programs) you should use it with care.
  54.  
  55.   If you find the program useful you might like to make a donation to Oxfam
  56. - say £5.
  57.  
  58.   I can be contacted by e-mail on Janet (the UK academic network) as
  59. SB2 @ UK.AC.RL.IB, or by snail mail:
  60.  
  61.        Stephen Burke,
  62.    c/o 7, Egdon Drive,
  63.        Luton,
  64.        Beds
  65.        LU2 7AZ
  66.